import request from '@/router/axios';

//异常类型列表
export const getList = (current, size, params) => {
    return request({
        url: '/api/blade-tms/exceptionType/ExceptionMold/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
//删除异常类型
export const deleteException = (data) => {
    return request({
        url: '/api/blade-tms/exceptionType/ExceptionMold/remove',
        method: 'post',
        data: {
            ...data,
        }
    })
}
//新增修改
export const saveOrUpdate = (data) => {
    return request({
        url: '/api/blade-tms/exceptionType/ExceptionMold/saveOrUpdate',
        method: 'post',
        data: {
            ...data,
        }
    })
}
// 异常记录
export const getRecordList = (current, size, params) => {
    return request({
        url: '/api/blade-tms/exceptionrecord/abnormalRecord/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
//删除异常记录
export const deleteRecord = (data) => {
    return request({
        url: '/api/blade-tms/exceptionrecord/abnormalRecord/delete',
        method: 'post',
        data: {
            ...data,
        }
    })
}
// 异常费用类型
export const getExpenseTypeList = (current, size, params) => {
    return request({
        url: '/api/blade-tms/exceptioncosttype/exceptionMoldType/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 费用类型
export const getExceptionMoldType = (orderType) => {
    return request({
        url: '/api/blade-tms/exceptioncosttype/exceptionMoldType/detail',
        method: 'get',
        params: {
            orderType
        }
    })
}
//修改异常费用类型
export const updateExceptionMoldType = (data) => {
    return request({
        url: '/api/blade-tms/exceptioncosttype/exceptionMoldType/saveOrUpdate',
        method: 'post',
        headers: {
            'Content-Type': 'application/json'
        },
        transformRequest(data) {
            return data
        },
        data: JSON.stringify(data)
    })
}